<?php
namespace app\admin\validate;

use think\Validate;

class StoreTruck extends Validate
{
    protected $rule = [
        'title'   => 'require',
        'price'   => 'require|number',
        'direct_price'   => 'number',
        'low_price'   => 'number'
    ];

    protected $message = [
        'title.require'   => '请输入标题',
        'price.require'   => '请输入价格',
        'price.number'   => '价格只能填写数字',
        'direct_price.number'   => '指导价只能填写数字',
        'low_price.number'   => '降价只能填写数字'
    ];
}